import { Component, OnInit,Input } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { Router,NavigationExtras,ActivatedRoute } from '@angular/router';

@Component({
  selector: 'app-common-no-payment-pwd',
  templateUrl: './common-no-payment-pwd.page.html',
  styleUrls: ['./common-no-payment-pwd.page.scss'],
})
export class CommonNoPaymentPwdPage implements OnInit {
  @Input()url:string;

  constructor(
    public modalCtrl: ModalController,
    private router:Router,
    private activatedRoute:ActivatedRoute
  ) { }

  ngOnInit() {
  }

  setPaymentPwd(){
    this.modalCtrl.dismiss({
      'dismissed': true
    });
    let navigationExtras: NavigationExtras = {
      queryParams: {
       url:this.url
      } 
    };
    this.router.navigate(['/tabs/myAccount/setting/payment-settings/payment-password'],navigationExtras);
  }
}
